package com.zhentao.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 会员卡
 * @TableName ad_membership_card
 */
@TableName(value ="ad_membership_card")
@Data
public class AdMembershipCard implements Serializable {
    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 会员等级名称
     */
    private String membershipName;

    /**
     * 会员价格
     */
    private BigDecimal membershipPrice;

    /**
     * 会员介绍
     */
    private String membershipDesc;

    /**
     * 会员时间(按月)
     */
    private Integer membershipTime;

    /**
     * 创建时间
     */
    private Date createdTime;

    /**
     * 修改时间
     */
    private Date updatedTime;

    /**
     * 软删
     */
    private Integer isDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AdMembershipCard other = (AdMembershipCard) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getMembershipName() == null ? other.getMembershipName() == null : this.getMembershipName().equals(other.getMembershipName()))
            && (this.getMembershipPrice() == null ? other.getMembershipPrice() == null : this.getMembershipPrice().equals(other.getMembershipPrice()))
            && (this.getMembershipDesc() == null ? other.getMembershipDesc() == null : this.getMembershipDesc().equals(other.getMembershipDesc()))
            && (this.getMembershipTime() == null ? other.getMembershipTime() == null : this.getMembershipTime().equals(other.getMembershipTime()))
            && (this.getCreatedTime() == null ? other.getCreatedTime() == null : this.getCreatedTime().equals(other.getCreatedTime()))
            && (this.getUpdatedTime() == null ? other.getUpdatedTime() == null : this.getUpdatedTime().equals(other.getUpdatedTime()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getMembershipName() == null) ? 0 : getMembershipName().hashCode());
        result = prime * result + ((getMembershipPrice() == null) ? 0 : getMembershipPrice().hashCode());
        result = prime * result + ((getMembershipDesc() == null) ? 0 : getMembershipDesc().hashCode());
        result = prime * result + ((getMembershipTime() == null) ? 0 : getMembershipTime().hashCode());
        result = prime * result + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode());
        result = prime * result + ((getUpdatedTime() == null) ? 0 : getUpdatedTime().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", membershipName=").append(membershipName);
        sb.append(", membershipPrice=").append(membershipPrice);
        sb.append(", membershipDesc=").append(membershipDesc);
        sb.append(", membershipTime=").append(membershipTime);
        sb.append(", createdTime=").append(createdTime);
        sb.append(", updatedTime=").append(updatedTime);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}